Global DDName As String 'the NAME of the DD Function
Global DDCmdString As String 'The COMMAND string to send
Global Const INIFILE = "DDLNCH.INI" 'basic INI file
Global Const FILEMARKER = "<F>" 'wild cards searched for in the string
Global Const DIRMARKER1 = "<D" 'dir wild card
Global Const DIRMARKER2 = ">"
Global Const LENDIRMARKER1 = 2
Global Const LENDIRMARKER2 = 1
Global Const LENFILEMARKER = 3
Type POINTAPI 'used to identify location of drop action
x As Integer
y As Integer
End Type
Type Msg 'used by peekmessage function
hwnd As Integer
message As Integer
wparam As Integer
lParam As Long
time As Long
pt As POINTAPI
End Type
'dragacceptfiles tells windows that hwnd can accept drag/drop messages
Declare Sub DragAcceptFiles Lib "Shell" (ByVal hwnd As Integer, ByVal Accept As Integer)
'Main() uses peekmessage to determine if hwnd has received a d/d message
Declare Function PeekMessage Lib "User" (lpMsg As Msg, ByVal hwnd As Integer, ByVal wMsgFilterMin As Integer, ByVal wMsgFilterMax As Integer, ByVal wRemoveMsg As Integer) As Integer
'dragqueryfile is used to get number of files dropped (when indexFilenum=-1) and then name of each file in succession (when indexFilenum > -1)
Declare Function DragQueryFile Lib "Shell" (ByVal hdrop As Integer, ByVal indexFilenum As Integer, ByVal lpFileName As String, ByVal buffsize As Integer) As Integer
'dragfinish must be called after all filenames have been retrieved to cancel memory buffer for d/d operation
Declare Sub DragFinish Lib "Shell" (ByVal hwnd As Integer)
Declare Function GetPrivateProfileString Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Integer, ByVal lpFileName As String) As Integer
Declare Function GetPrivateProfileInt Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal nDefault As Integer, ByVal lpFileName As String) As Integer
Declare Function WinExec Lib "Kernel" (ByVal lpCmdLine As String, ByVal nCmdShow As Integer) As Integer